package com.activitycode.datamodel.model;

import org.json.*;
import java.util.ArrayList;

public class ChildStyleBase {
	
    private ArrayList<ChildStyle> childStyle;
    
    
	public ChildStyleBase () {
		
	}	
        
    public ChildStyleBase (JSONObject json) {
    

        this.childStyle = new ArrayList<ChildStyle>();
        JSONArray arrayChildStyle = json.optJSONArray("childStyle");
        if (null != arrayChildStyle) {
            int childStyleLength = arrayChildStyle.length();
            for (int i = 0; i < childStyleLength; i++) {
                JSONObject item = arrayChildStyle.optJSONObject(i);
                if (null != item) {
                    this.childStyle.add(new ChildStyle(item));
                }
            }
        }
        else {
            JSONObject item = json.optJSONObject("childStyle");
            if (null != item) {
                this.childStyle.add(new ChildStyle(item));
            }
        }


    }
    
    public ArrayList<ChildStyle> getChildStyle() {
        return this.childStyle;
    }

    public void setChildStyle(ArrayList<ChildStyle> childStyle) {
        this.childStyle = childStyle;
    }


    
}
